package com.sixnimmt.app.client.game;

import java.util.List;

import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
import com.sixnimmt.app.shared.game.domain.Card;
import com.sixnimmt.app.shared.game.exception.ChoiceAlreadyMadeException;
import com.sixnimmt.app.shared.game.exception.GameAlreadyStartedException;
import com.sixnimmt.app.shared.game.exception.InvalidPlayerException;
import com.sixnimmt.app.shared.game.exception.InvalidStackException;
import com.sixnimmt.app.shared.game.exception.NotInHandException;
import com.sixnimmt.app.shared.game.information.ServerInformation;
import com.sixnimmt.app.shared.game.notification.GameNotification;

/**
 * The client side stub for the RPC service.
 */
@RemoteServiceRelativePath("gameService")
public interface GameService extends RemoteService {

	ServerInformation retrieveServerInformation();

	boolean joinGame(String playerName);

	void startGame(String playerName) throws InvalidPlayerException, GameAlreadyStartedException;

	void restartServer(String playerName) throws InvalidPlayerException;

	void playCard(String playerName, Card card) throws NotInHandException, InvalidPlayerException,
			ChoiceAlreadyMadeException;

	void chooseStack(String playerName, int stack) throws InvalidStackException, InvalidPlayerException;

	List<GameNotification> retieveGameNotifications(String playerName);

}
